#ifndef DSP2833X_XINTFLIB_H_
#define DSP2833X_XINTFLIB_H_

// Zone 0: Base Addr: 0x00 4000; Length = 0x00FFF
// Zone 1: Base Addr: 0x10 0000; Length = 0xFFFFF
// Zone 7: Base Addr: 0x20 0000; Length = 0xFFFFF

// Only define for 16 bits datamode.

/* Note: must include DSP2833x_xintf.c and DSP2833x_EINTF.c
 */

// Define RealSys Peripheral addr
#ifndef SW_XINTF_ADDR
	#define 	SW_XINTF_ADDR		(volatile Uint16 *)0x4000
#endif
//#define		LCD_XINTF_ADDR		(volatile Uint16 *)0x4100
#ifndef LED_XINTF_ADDR
	#define		LED_XINTF_ADDR		(volatile Uint16 *)0x4200
#endif	

// Direct access to some devices
#define 		SW_DATA				*(SW_XINTF_ADDR)
#define			LED_DATA			*(LED_XINTF_ADDR)


//--------------------------------
// Declare some functions
//--------------------------------
void XINTF_Init(void);
void XINTF_Write(volatile Uint16 * XINTF_Addr,Uint16 XINF_Data);
Uint16 XINTF_Read(volatile Uint16 * XINTF_Addr);

// For RealSys module
Uint16 XINTF_ReadSW(void);

#endif /*DSP2833X_XINTFLIB_H_*/
